package com.zhouyu.advice;

import org.aopalliance.aop.Advice;
import org.aopalliance.intercept.MethodInterceptor;
import org.jetbrains.annotations.NotNull;
import org.springframework.aop.Advisor;
import org.springframework.aop.framework.adapter.AdvisorAdapter;

/**
 * @author yangjian
 */
public class TestAdvisorAdaptor implements AdvisorAdapter {

	@Override
	public boolean supportsAdvice(@NotNull Advice advice)
	{
		return true;
	}

	@NotNull
	@Override
	public MethodInterceptor getInterceptor(@NotNull Advisor advisor)
	{
		return new TestMethodInterceptor();
	}
}
